package cn.rxmind.dlicense.server.config;

import cn.rxmind.dlicense.core.creator.DLicenseCreator;
import cn.rxmind.dlicense.core.decoder.DLicenseDecoder;
import cn.rxmind.dlicense.core.decoder.DPublicCertLicenseDecoder;
import cn.rxmind.dlicense.core.factory.DLicenseCreatorFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 证书管理器配置
 *
 * @author renxin
 * @email renxinzhiliangzhi@163.com
 * @date 2021/4/14 9:39 上午
 */
@Configuration
public class LicenseManagerConfiguration  {

    @Bean
    public DLicenseCreator utryUtryLicenseManager(){

        return DLicenseCreatorFactory.createUtryLicenseCreator();
    }

    @Bean
    public DLicenseDecoder licenseDecoder(){

        return new DPublicCertLicenseDecoder();
    }

}
